package com.eks.plus.controller;


import com.eks.plus.model.auto.UUserInfo;
import com.eks.plus.service.IUUserInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author chenfenghai
 * @since 2020-09-28
 */
@RestController
public class UUserInfoController {

    @Autowired
    IUUserInfoService userInfoService;

    @GetMapping("/test")
    public String test(){
        return "UUserInfoController.test";
    }

    @GetMapping("/all")
    public List<UUserInfo> getAll(){
        return userInfoService.list();
    }

    @GetMapping("/saveall")
    public String saveAll(){
        userInfoService.saveAll();
        return "saveAll";
    }
}
